package com.pay.service;

import java.util.List;

import com.pay.beans.ReturnContent;
import com.pay.entity.wx.WxPayBill;

public interface WxPayBillService {

	/**
	 * @Description 查询外部订单是否创建
	 * @param outerAppId
	 * @param outerTradeNo
	 * @return
	 * @see 需要参考的类或方法
	 */
	public WxPayBill findPayBillByOutTradeNo(String outerAppId, String outerTradeNo);

	public void insert(WxPayBill wxPayBill);

	public WxPayBill findPayBillByPartnerTradeNo(String partnerTradeNo);

	public void update(WxPayBill wxPayBill);

	/**
	 * 根据活动ID和外部订单号直接发红包
	 * 返回成功\已发送\失败。
	 * @param outerAppid
	 * @param openId
	 * @param amount
	 * @param ip
	 * @param desc
	 * @param outerOpenid
	 * @param outerTradeNo
	 * @return
	 */
	public ReturnContent<Object> insertPayBill(String outerAppid, String openId, String amount, String ip, String desc,String outerOpenid,String outerTradeNo);
	
	public void updateOpenId(WxPayBill wxPayBill);

	public List<WxPayBill> findPayBillByOutOpenId(String activityId, String outerOpenid);

}
